package com.henry.sprite;

import java.awt.Color;
import java.awt.Graphics;
import java.util.ArrayList;

public class DrawGraphics {
    ArrayList<Mover> movingSprites;

    /** Initializes this class for drawing. */
    public DrawGraphics() {
        movingSprites = new ArrayList<>();
        // movingSprites.add(new Bouncer(100, 170, 3, 1, new Rectangle(15, 20, Color.RED)));
        // movingSprites.add(new Bouncer(50, 120, 2, 3, new Oval(30, 30, Color.CYAN)));
        // movingSprites.add(new StraightMover(40, 30, 2, 3, new Rectangle(15, 20, Color.PINK)));
        // movingSprites.add(new StraightMover(20, 20, 1, 1, new Oval(30, 30, Color.MAGENTA)));

        movingSprites.add(MoverFactory.getMover(
                MoverFactory.Shape.Rectangle, Color.RED, 15, 20,
                MoverFactory.MoveType.Bouncing, 100, 170, 3, 1));
        movingSprites.add(MoverFactory.getMover(
                MoverFactory.Shape.Oval, Color.RED, 30, 30,
                MoverFactory.MoveType.Bouncing, 50, 120, 2, 3));
        movingSprites.add(MoverFactory.getMover(
                MoverFactory.Shape.Rectangle, Color.PINK, 15, 20,
                MoverFactory.MoveType.Straight, 40, 30, 2, 3));
        movingSprites.add(MoverFactory.getMover(
                MoverFactory.Shape.Oval, Color.MAGENTA, 30, 30,
                MoverFactory.MoveType.Straight, 20, 20, 1, 1));
    }

    /** Draw the contents of the window on surface. */
    public void draw(Graphics surface) {
        for (Mover b : movingSprites) { b.draw(surface); }
    }
}
